import Mock from 'mockjs';

let loginCheck = (req, res) => {
  // let username = req.query.username
  // let password = req.query.password
  let uuid = Mock.mock('@guid');
  res.send({
    success: true,
    code: 200,
    results: {
      id: uuid,
      tokenType: 'bearer',
      authority: 'admin',
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
      userName: '管理员',
      account: 'admin',
      license: 'made by supcon',
      accessToken:
        'eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJyb2xlX25hbWUiOiJhZG1pbmlzdHJhdG9yIiwidXNlcl9pZCI6IjEiLCJyb2xlX2lkIjoiMSIsInVzZXJfbmFtZSI6ImFkbWluIiwidG9rZW5fdHlwZSI6ImFjY2Vzc190b2tlbiIsImFjY291bnQiOiJhZG1pbiIsInRlbmFudF9jb2RlIjoiMDAwMDAwIiwiY2xpZW50X2lkIjoic3dvcmQiLCJleHAiOjE1NjM3NjAyOTMsIm5iZiI6MTU2Mzc1NjY5M30.VOTyJYK_6JHrhPIlMLvZOrcLpFCSszgq5JQDuts_xJw',
      refreshToken:
        'eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJ1c2VyX2lkIjoiMSIsInRva2VuX3R5cGUiOiJyZWZyZXNoX3Rva2VuIiwiY2xpZW50X2lkIjoic3dvcmQiLCJleHAiOjE1NjQzNjE0OTMsIm5iZiI6MTU2Mzc1NjY5M30.kSPAbng_yDu85QL2WWDn0RT55sgxptifLvC7XIuv7Gk',
      expiresIn: 3600,
    },
  });
};

export default {
  'POST /api/auth/login': loginCheck,
};
